<!--title-->
<div class="mnav1">
	<div class="m_nav">
		<div class="nav_left">
			<em class="home_icon"><?=$this->sys_name?></em><span>&nbsp;&gt;&nbsp;</span><font><?=$this->title?></font>
		</div>
	</div>
</div>

<div class="content-table">
<div class="content-table-title"><?=$this->title?></div>
<br />
<?php if($this->msg):?>
<div class="replace"><?=$this->msg?></div>
<br />
<?php endif;?>
<form action="/maozhua/everyday-dealer-monitor" name="form1" method="GET">
查询时间：<input type="text" name="date_start" id="date_start" autocomplete="off" style="width: 100px"> ~ <input type="text" name="date_end" id="date_end" autocomplete="off" style="width: 100px">
&nbsp;&nbsp;&nbsp;&nbsp;
城市：<input type="text" name="city" style="width:100px;" <?php if($this->city){echo "value='".$this->city."'";}?> />
&nbsp;&nbsp;&nbsp;&nbsp;
平台：
<select name="pingtai">
    <option value="">请选择</option>
    <option value="1" <?php if($this->pingtai==1){echo 'selected=selected';}?>>之家</option>
    <option value="2" <?php if($this->pingtai==2){echo 'selected=selected';}?>>易车</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;

客户名称：<input type="text" name="user_name" style="width:100px;" <?php if($this->user_name){echo "value='".$this->user_name."'";}?> />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" class="button" value="搜索" />
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/maozhua/export-everyday-dealer-monitor?user_name=<?=$this->user_name?>&date_start=<?=$this->date_start?>&date_end=<?=$this->date_end?>&city=<?=$this->city?>&pingtai=<?=$this->pingtai?>"><input type="button" class="button-cancle" value="导出Excel"/></a>
</form>
<br />
<table>
  <tr>
    <th>日期</th>
    <th>客户</th>
    <th>城市</th>
    <th>平台</th>
	<th>私有线索</th>
    <th>前三占比</th>
	<th>出现丢分项目</th>
	<th>登录情况</th>
  </tr>

  <?php foreach($this->data['current_page_info'] as $key => $row):?>
  <tr>
    <td><?=$row['datetime']?></td>
    <td><?=$row['user_name']?></td>
    <td><?=$row['city_name']?></td>
	<td><?=$row['account_type']==1?"<font>汽车之家</font>":"<font>易车</font>"?></td>
	<td><?=$row['day_clues_warn']?></td>
	<td><?=$row['top3_warn']?></td>
	<td><?=$row['lost_item_warn']?></td>
	<td><?=$row['login_status_warn']?></td>
  </tr>
  <?php endforeach;?>
</table>
    <br /><br />
    <div align="right"><?=$this->pagination?></div>
    <br /><br /><br />
<br /><br />

    <script>
        var date = new Date();//获取当前时间
        date.setDate(date.getDate()-1);

        $(function() {
            $( "#date_start" ).datepicker({ dateFormat: 'yy-mm-dd'}).datepicker("setDate", "<?=$this->date_start?>");
        });

        $(function() {
            $( "#date_end" ).datepicker({ dateFormat: 'yy-mm-dd'}).datepicker("setDate", "<?=$this->date_end?>");
        });
    </script>